home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lantools / bkup / s_backup.bat < prev    next >
DOS Batch File  |  1990-07-27  |  2KB  |  61 lines

  1. :... S_BACKUP.BAT, Craig MacPherson
  2. :    This file is called from Saber menu. It does the following
  3. :     -  Checks the status to make sure no other jobs exist from this user.
  4. :     -  Preps the users workstation for the backup process
  5. :     -  creates the users backup job for the backup processor.
  6. :
  7. :    Variables passed from the menu system:
  8. :    %1 = Drive
  9. :    %2 = ALL or MOD  
  10. :    
  11.  
  12. :... Update users workstation with correct system time and date and set z: drive
  13.      systime >>nul:
  14.      cd z:\backups
  15.  
  16. :... Check the users backup status
  17.      n:
  18.      cd n:\backups\backup.jbs
  19.      if not exist %userid%.bat goto CONTINUE
  20.      if exist %userid%.que goto NOT_RUNNING_YET
  21.  
  22. :JOB_ALREADY_IN_PROGRESS
  23.      echo.
  24.      echo A backup job is already in progress for this workstation
  25.      echo returning to menu....
  26.      be delay 50
  27.      goto end
  28.  
  29. :NOT_RUNNING_YET
  30.       echo.
  31.       echo A backup job already exists for this workstation
  32.       be ask "do you want to continue anyway? (y/n)" yn DEF=n T=15
  33.       if errorlevel 2 goto END
  34.       del %userid%.bat>>nul:
  35.       del %userid%.que>>nul:
  36.  
  37. :CONTINUE
  38. :... Load Map Assist on the users workstation. Error check in case of failure.
  39. :    Note use of absolute network address of backup server.
  40.      MAR - >>nul:
  41.      MAR %1 rw=4-54 /T/C >>nul:
  42.      if not errorlevel 1 goto CREATE_JOB
  43.      smessage "Problem initializing backup - Contact Client Services"
  44.      goto END
  45.  
  46. :CREATE_JOB
  47. :... Place start of job message in users detailed history log.
  48.      call z:b_soj.bat %userid%
  49.  
  50.  
  51. :... Create the batch file for this users station
  52. :    to be processed by the backup server
  53.  
  54.      echo Put this user in the que>z:\backups\backup.jbs\%userid%.que
  55.      echo call %SCRIPTS%b_proces.bat %USERID% %1 %2 >z:\backups\backup.jbs\%userid%.bat
  56.  
  57. :... Give user an info message
  58.      smessage "Backup Accepted, Backup Server will backup your station A.S.A.P"
  59.  
  60. :END
  61.